/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package co.com.entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author 841756
 */
@Entity
@Table(name = "tblparametroslegales")
@NamedQueries({
    @NamedQuery(name = "Tblparametroslegales.findAll", query = "SELECT t FROM Tblparametroslegales t"),
    @NamedQuery(name = "Tblparametroslegales.findByIdParam", query = "SELECT t FROM Tblparametroslegales t WHERE t.idParam = :idParam"),
    @NamedQuery(name = "Tblparametroslegales.findByAno", query = "SELECT t FROM Tblparametroslegales t WHERE t.ano = :ano"),
    @NamedQuery(name = "Tblparametroslegales.findByRentaExenta", query = "SELECT t FROM Tblparametroslegales t WHERE t.rentaExenta = :rentaExenta"),
    @NamedQuery(name = "Tblparametroslegales.findByAporteFondo", query = "SELECT t FROM Tblparametroslegales t WHERE t.aporteFondo = :aporteFondo"),
    @NamedQuery(name = "Tblparametroslegales.findByLimite", query = "SELECT t FROM Tblparametroslegales t WHERE t.limite = :limite")})
public class Tblparametroslegales implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_param")
    private Integer idParam;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 4)
    @Column(name = "ano")
    private String ano;
    @Basic(optional = false)
    @NotNull
    @Column(name = "renta_exenta")
    private double rentaExenta;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aporte_fondo")
    private double aporteFondo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "limite")
    private double limite;
    @JoinColumn(name = "cod_compania", referencedColumnName = "cod_compania")
    @ManyToOne(optional = false)
    private Tblcompania codCompania;
    @JoinColumn(name = "id_estado", referencedColumnName = "id_estado")
    @ManyToOne(optional = false)
    private TblEstado idEstado;

    public Tblparametroslegales() {
    }

    public Tblparametroslegales(Integer idParam) {
        this.idParam = idParam;
    }

    public Tblparametroslegales(Integer idParam, String ano, double rentaExenta, double aporteFondo, double limite) {
        this.idParam = idParam;
        this.ano = ano;
        this.rentaExenta = rentaExenta;
        this.aporteFondo = aporteFondo;
        this.limite = limite;
    }

    public Integer getIdParam() {
        return idParam;
    }

    public void setIdParam(Integer idParam) {
        this.idParam = idParam;
    }

    public String getAno() {
        return ano;
    }

    public void setAno(String ano) {
        this.ano = ano;
    }

    public double getRentaExenta() {
        return rentaExenta;
    }

    public void setRentaExenta(double rentaExenta) {
        this.rentaExenta = rentaExenta;
    }

    public double getAporteFondo() {
        return aporteFondo;
    }

    public void setAporteFondo(double aporteFondo) {
        this.aporteFondo = aporteFondo;
    }

    public double getLimite() {
        return limite;
    }

    public void setLimite(double limite) {
        this.limite = limite;
    }

    public Tblcompania getCodCompania() {
        return codCompania;
    }

    public void setCodCompania(Tblcompania codCompania) {
        this.codCompania = codCompania;
    }

    public TblEstado getIdEstado() {
        return idEstado;
    }

    public void setIdEstado(TblEstado idEstado) {
        this.idEstado = idEstado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idParam != null ? idParam.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tblparametroslegales)) {
            return false;
        }
        Tblparametroslegales other = (Tblparametroslegales) object;
        if ((this.idParam == null && other.idParam != null) || (this.idParam != null && !this.idParam.equals(other.idParam))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "" + idParam + "";
    }
    
}
